/************************************************
 * Author       :   XXY
 * Blog         :   https://www.cnblogs.com/jzyl
 * Gitee        :   https://gitee.com/xiaobaichong
 * Email        :   1047185209@QQ.com
 * FileName     :   IScene.cs
 * CreateData   :   2023/5/23 14:33:28
 * UnityVersion :   2021.3.20f1c1
 * Description  :   场景接口
************************************************/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Hotfix
{
    /// <summary>
    /// 场景接口
    /// </summary>
    internal interface IScene : ISystemComponent
    {
        /// <summary>
        /// 向场景添加实体
        /// </summary>
        /// <typeparam name="T">实体类型</typeparam>
        /// <param name="entityName">实体名称</param>
        /// <returns></returns>
        bool AddEntity<T>(string entityName) where T : EntityBase;
        /// <summary>
        /// 通过名称移除场景内的实体
        /// </summary>
        /// <param name="entityName">实体名称</param>
        /// <returns></returns>
        bool RemoveEntity(string entityName);
        /// <summary>
        /// 通过名称获取场景内的实体
        /// </summary>
        /// <typeparam name="T">实体</typeparam>
        /// <param name="entityName">实体名称</param>
        /// <returns></returns>
        T GetEntity<T>(string entityName) where T : EntityBase;
        /// <summary>
        /// 场景初始化入口
        /// </summary>
        void OnInit();
    }
}
